<meta charset="utf-8">
<div data-ng-controller="UserManagementController">

	<div style="padding-top: 0px; padding-left: 20px;z-index: 10;width:100%;position:fixed;height: 20px;margin-top: 20px;">
		<font color="#636778">航天信息通讯录</font> > <font color="#333333">用户管理</font>
	</div>
	
	<div class="form-group clearfix col-sm-12">
		
		<div class="col-xs-12" style="top: 50px;">
			<div style="position: relative; float: left;">
				<div style="float: left; line-height: 25px; position: relative; left: -10px">
					用户名称：<input type="text" placeholder="   请输入用户名称" size="35"  data-ng-model="keyWord" />
				</div>
				<div style="float: left; line-height: 25px; position: relative; left: 10px">
					<input type="button" value="查询" data-ng-click="search()">
				</div>
				
				<div style="float: left; line-height: 25px; position: relative; left: 20px">
					<!-- <input data-fc-add-user data-on-select="addUser($choseUser)" type="button" value="新增用户" data-ng-click="addUser()"> -->
					<input type="button" value="新增用户" data-ng-click="addUserNew()">					
				</div>
				
			</div>
		</div>
		<!-- <div class="col-xs-12" style="top: 60px;position: relative;margin-left: -10px;color: green;font-size: 20px">
			当前在线用户：{{onlineCount}}人
		</div> -->
	</div>
	<div style="padding-top: 110px; padding-left: 0px;width:100%;">
		<!-- 数据记录 -->
		<div class="col-sm-12 paddingLeft0" style="padding-left: 16px;padding-right: 16px;" >
            <table class="table table-bordered table-striped table-hover" style="text-align: center;" >
	            <thead>
	                <tr> 
	                    <th style="text-align: center; align:center;" >编号</th>
	                    <th style="text-align: center; align:center;" >用户姓名</th>
	                    <th style="text-align: center; align:center;" >用户昵称</th>
	                    <th style="text-align: center; align:center;" >用户类型</th>
	                    <th style="text-align: center; align:center;" >注册时间</th>
	                    <th style="text-align: center; align:center;" >账号状态</th>
	                    <th style="text-align: center; align:center;" >操作</th>
	                </tr>
                </thead>
                <tbody>
	                <tr data-ng-if="data.length > 0" data-ng-repeat="user in data">
	                    <td style="width:5%; cursor: pointer; text-align:center;">{{$index+1}}</td>
	                    <td style="width:10%; cursor: pointer; text-align:center;">{{user.userName || ''}}</td>
	                    <td style="width:10%; cursor: pointer; text-align:center;">{{user.nickName || ''}}</td>
	                    <td data-ng-if="user.userType==1" style="width:10%; cursor: pointer; text-align:center;"><font color="red">管理员</font></td>
	                    <td data-ng-if="user.userType==0" style="width:10%; cursor: pointer; text-align:center;">系统用户</td>
	                    <td data-ng-if="user.userType==2" style="width:10%; cursor: pointer; text-align:center;">后台用户</td>
	                    <td style="width:25%; cursor: pointer; text-align:center;">{{user.createDate | date:'yyyy-MM-dd HH:mm:ss'}}</td>
	                    
	                    <td style="width:10%; cursor: pointer; text-align:center;">
							<a ng-show="user.userType==1" href="javascript:void(0) " data-ng-click="updateStatus(user.userId,1)">&nbsp;</a>	                    	
							<a ng-show="(user.userType==0|| user.userType==2) && user.accountStatus==0" href="javascript:void(0) " data-ng-click="updateStatus(user.userId,1)"><font color="red">可停用</font></a>
							<a ng-show="(user.userType==0|| user.userType==2) && user.accountStatus==1" href="javascript:void(0) " data-ng-click="updateStatus(user.userId,0)"><font color="#00FF00">可启用</font></a>                 
						</td>
	                    <td style="width:10%; cursor: pointer; text-align:center;">
	                    	<a ng-show="user.userType==0 || user.userType==2" href="javascript:void(0) " data-ng-click="deleteUser(user.userId)">删除</a>
	                    	<a href="javascript:void(0) " data-ng-click="updateUser(user.userId)">修改</a>
	                    </td>
	                </tr>
                </tbody>
            </table>
        </div>
        <div data-ng-if="data.length > 0" class="col-sm-12" style="padding-left: 0px;padding-right: 16px;padding-top: 0px;" >
				<div class="yahoo2">
				<span> <a style="cursor: pointer;" ng-click="gotoPage(1);">首页</a>
					<a style="cursor: pointer;" ng-click="upPage(currentPage-1);">上一页</a>
					<a style="cursor: pointer;" ng-click="nextPage(currentPage+1);">下一页</a>
					<a style="cursor: pointer;" ng-click="gotoPage(totalPage);">尾页</a>
				</span>
				当前第{{currentPage}} 页 共 {{totalPage}}页
			</div>
		</div>
	</div>
</div>
